package xyz.csmcool.imoss.config;

/**
 * @author 什锦
 * @Package xyz.csmcool.imoss.config
 * @since 2022/8/5 14:25
 */

public enum UploadTypeEnum {

    /**
     * FASTDFS
     */
    FASTDFS(1),

    /**
     * tencentyun
     */
    TENCENT(2),

    ALI(3),

    HUAWEI(4),

    MINIO(5);

    private Integer type;

    UploadTypeEnum(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        type = type;
    }

    public static UploadTypeEnum getUploadTypeByCode(Integer code) {
        for (UploadTypeEnum ele : values()) {
            if (ele.getType().equals(code)) {
                return ele;
            }
        }
        return null;
    }
}
